package com.framework.log.service.impl;

import com.framework.log.mapper.SysLogMapper;
import com.framework.log.model.SysLog;
import com.framework.log.service.ISysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author zzg
 * @date 2024-12-28
 * @since 1.0
 */
@Service
public class SysLogService implements ISysLogService{
	@Autowired
    private SysLogMapper baseMapper;

	@Override
	@Transactional(propagation= Propagation.REQUIRES_NEW, rollbackFor = { Exception.class })
	public SysLog save(SysLog sysLog) {
		baseMapper.insert(sysLog);
		return sysLog;
	}
}
